// 加载数据库驱动并连接数据库
// const mongoose = require('mongoose');
// mongoose.connect('mongodb://WangPan:20010520@1.13.186.193:27017/Naixue?authSource=admin', { useNewUrlParser: true, useUnifiedTopology: true });
// mongoose.connection.on("connected", function () {
//     console.log('MongoDB is Connected');
// });


const mongoose = require('mongoose');
mongoose.connect('mongodb://localhost:27017/naixue', { useNewUrlParser: true, useUnifiedTopology: true });
mongoose.connection.on("connected", function () {
    console.log('MongoDB is Connected');
});